#pragma once

#include <iostream>
#include <string>
#include "smc_base.h"

using namespace std; 

class cstring
{
private:
	string str;
	unsigned int readoff;
public:
	cstring(void);
	~cstring(void);

	unsigned int size();
	
	unsigned int appendUCHAR( unsigned char p);
	
	unsigned int appendChars( char *p , unsigned int len );
	
	unsigned int appendString( string str , unsigned int len=0);

	unsigned int appendUINT( unsigned int iNum);
	
	unsigned int setChars(char *p,unsigned int len );
	
	unsigned int getUINT(unsigned int &pRc);
	
	unsigned int getUCHAR( unsigned char &pRc );

	unsigned int getChars( char *pRc  , unsigned int len);
	
	unsigned int getString( string &str , unsigned int len = 0);

	unsigned int zero();
	
	unsigned int dump();
};
